/*
 * @Author: guandeshen 295570679@qq.com
 * @Date: 2024-08-25 10:13:38
 * @LastEditors: guandeshen 295570679@qq.com
 * @LastEditTime: 2024-08-25 10:16:07
 * @FilePath: /task-admin/src/api/site/index.ts
 * @Description:
 *
 * Copyright (c) 2024 by RSC, All Rights Reserved.
 */
// /tenant/sites/index
import request from "@/utils/request";
import { SiteList, SiteQuery, SiteForm } from "./model";
class SiteAPI {
  /**
   * 获取项目分页列表
   *
   * @data data
   */
  static getPage(data: SiteQuery) {
    return request<any, PageResult<SiteList[]>>({
      url: "/tenant/sites/index",
      method: "post",
      data: data,
    });
  }

  /**
   * 添加编辑项目
   *
   * @data data
   */

  static add(data: SiteForm) {
    return request({
      url: "/tenant/sites/edit",
      method: "post",
      data: data,
    });
  }

  /**
   * 删除项目
   *
   * @data data
   */

  static deleteByIds(data: Ids) {
    return request({
      url: "/tenant/sites/del",
      method: "post",
      data: data,
    });
  }
}

export default SiteAPI;
